package Matches;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class demo6 {
    public static void main(String[] args) {
        String s = "abbbbbbbbbbbbbbbbbbbbbbbbbbbbaaaaaaaaaaaaaaaaaa";
        String s1 = "Java(?=8|11|17)";
        String s2 = "((?i)Java)(8|11|17)";
        String s3 = "^(((?i)Java)(?:8|11|17))";
        String s4 = "((?i)Java)(?!8|11|17)";
        String s5 = "ab+?";
        Pattern pattern = Pattern.compile(s5);
        Matcher matcher = pattern.matcher(s);
        while (matcher.find()){
            System.out.println(matcher.group());
        }
    }
}
